import { defineConfig } from 'vitepress';
import {
  GitChangelog,
  GitChangelogMarkdownSection,
} from '@nolebase/vitepress-plugin-git-changelog/vite';

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: 'Niuma Admin 文档',
  description: '一个 vue3 的 JavaScript 后台管理系统模板。',
  lang: 'zh-CN',
  ignoreDeadLinks: true,
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '📖 文档', link: '/introduction/niuma-admin' },
      { text: '🦄 技术支持', link: '/commercial/technical-support' },
      { text: '✨ 赞助', link: '/commercial/personal' },
    ],

    sidebar: [
      {
        text: '简介',
        items: [
          { text: '关于 Niuma Admin', link: '/introduction/niuma-admin' },
          { text: '快速开始', link: '/introduction/quick-start' },
        ],
      },
      {
        text: '基础',
        items: [
          { text: '布局', link: '/essentials/layout' },
          { text: '新增页面', link: '/essentials/new-page' },
        ],
      },
    ],

    socialLinks: [
      { icon: 'gitee', link: 'https://gitee.com/du-dudu/niuma-admin' },
    ],
  },
  vite: {
    plugins: [
      GitChangelog({
        repoURL: () => 'https://gitee.com/du-dudu/niuma-admin-doc',
      }),
      GitChangelogMarkdownSection(),
    ],
  },
});
